package com.songcha.library_database_douyue.manager

import com.songcha.library_database_douyue.LibraryDatabaseDouyueApplication

class GreenDaoManager {
    var bookSearchHistoryDao = LibraryDatabaseDouyueApplication.getDaoSession().bookSearchHistoryBeanDao
    var bookBrowseHistoryDao = LibraryDatabaseDouyueApplication.getDaoSession().bookBrowseHistoryBeanDao
    var bookDetailDBBeanDao = LibraryDatabaseDouyueApplication.getDaoSession().bookDetailDBBeanDao
    var bookShelfDBBeanDao = LibraryDatabaseDouyueApplication.getDaoSession().bookShelfDBBeanDao
    var bookReadProgressDBBeanDao = LibraryDatabaseDouyueApplication.getDaoSession().bookReadProgressDBBeanDao
    var bookLastReadDBBeanDao = LibraryDatabaseDouyueApplication.getDaoSession().bookLastReadDBBeanDao
    var bookTodayReadTimeDBBeanDao = LibraryDatabaseDouyueApplication.getDaoSession().bookTodayReadTimeDBBeanDao
    var bookTodayReadChapterCountDBBeanDao=LibraryDatabaseDouyueApplication.getDaoSession().bookTodayReadChapterCountDBBeanDao
    var bookTodayCommentWriteCountDBBeanDao=LibraryDatabaseDouyueApplication.getDaoSession().bookTodayCommentWriteCountDBBeanDao
    var bookDownloadDBBeanDao=LibraryDatabaseDouyueApplication.getDaoSession().bookDownloadDBBeanDao
    var todayObtainGoldCountDao=LibraryDatabaseDouyueApplication.getDaoSession().todayObtainGoldCountDBBeanDao
    var todayWatchRewardAdvertCountDao=LibraryDatabaseDouyueApplication.getDaoSession().todayWatchRewardAdvertCountDBBeanDao

    private constructor()

    companion object{
        private var instance: GreenDaoManager?=null

        @JvmStatic
        fun getInstance(): GreenDaoManager {
            if(instance ==null){
                synchronized(GreenDaoManager::class.java){
                    if(instance ==null){
                        instance = GreenDaoManager()
                    }
                }
            }
            return instance!!
        }
    }
}